package routers

import (
	"gitee.com/liuyongchina/init-project/conf"
	"gitee.com/liuyongchina/init-project/controllers"
	"github.com/gin-gonic/gin"
)

func InitRouter(sc conf.GinConfig) *gin.Engine {
	r := gin.New()
	r.Use(gin.Recovery())
	gin.SetMode(sc.RunMode)
	r.GET("index", controllers.NewHello().Index)
	return r
}
